In general, a camera module includes a substrate on which a solid-state imaging device is mounted and a lens holder mounted on the substrate and having optical members such as a lens and the like therein.
In recent years, there are electronic devices having the above camera module to achieve an imaging function and having applications for achieving various kinds of functions. The electronic device has a touch panel and achieves the above functions including the image capturing function by operating the touch panel. Such an electronic device has a proximity sensor to detect a distance from the electronic device to an object in order to suppress malfunction of the applications.
However, since the conventional electronic device has the camera module and the proximity sensor as separate components, it is necessary to mount both of them to the electronic device. Therefore, there is a problem in that the size of the electronic device may increase.